/*
 * @Author: jiangjin
 * @Date: 2021-10-13 15:10:31
 * @LastEditTime: 2021-10-13 16:06:07
 * @LastEditors: jiangjin
 * @Description:
 *
 */

import { ActionContext } from 'vuex'
import { UserState } from '.'
import { USER_UPDATE_USER_NUM } from './mutations'

export const USER_UPDATE_USER_NUM_ACTION = 'USER_UPDATE_USER_NUM_ACTION'

export function asyncUpdateUserNum({ commit }: ActionContext<UserState, any>, payload: any) {
  setTimeout(() => {
    commit(USER_UPDATE_USER_NUM)
  }, 2000)
}

export default {
  [USER_UPDATE_USER_NUM_ACTION]: asyncUpdateUserNum,
}
